<?php
/**
 * Name Block
 *
 * @author Xavier VILAIN
 * @package Shama\Contact
 * @license
 */
use Fox\Generator;
use Shama\Messages;
use Fox\Html\Input;
use Fox\Html\DropList;
$block = new Fox\Html\Block("bName",Msg(Messages::BUNDLE,Messages::LABEL_NAMES));
$block->add(new DropList(array("addr_title","title"),true,true))
			->maximize();
$block->add(new Input(array("last_name","name1"),true));
$block->add(new Input(array("first_name","name2")),2,"name1");
$block->add(new Input("company"))
			->mandatory()
			->size(Input::SIZE_MEDIUM)
			->autocomplete(
				Generator::url('companies','autocomplete'),
				Generator::url('companies','infos')
			)
			->add(new Input("companyid"))
				->hidden();

$block->add(new Input("function"));
$block->autoWidth();
$block->collapsed(false);
return $block;